package com.white.bean;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * -- ⑭　回复：回复ID、被回复评论ID、回复评论ID、回复时间。
 * create table reply(
 * replyId int primary key AUTO_INCREMENT comment "回复ID",
 * beReplyCommentId int comment "被回复评论ID",
 * foreign key(beReplyCommentId) REFERENCES comment(commentId) on delete cascade on update cascade,
 * replyCommentId int comment "回复评论ID",
 * foreign key(replyCommentId) REFERENCES comment(commentId) on delete cascade on update cascade,
 * createTime TIMESTAMP not null default CURRENT_TIMESTAMP comment "回复时间，默认当前时间戳"
 * );
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Reply implements Serializable {
    /*只能标注到一个属性列，且该列为Long包装类*/
    @TableId(value = "replyId")
    private Long replyId;
    private Long beReplyCommentId, replyCommentId;
    private String createTime;

    public Reply(Long beReplyCommentId, Long replyCommentId) {
        this.beReplyCommentId = beReplyCommentId;
        this.replyCommentId = replyCommentId;
    }
}
